package sqlexplorer.domain.resultset;

import java.util.HashMap;
import java.util.List;

public class QueryResultSet {
	
	private String[] m_columnHeaders;
	private HashMap<String,List<String>> m_values;
	
	public QueryResultSet(String[] columnHeaders,HashMap<String,List<String>> values){
		m_columnHeaders=columnHeaders;
		m_values=values;
	}
	
	public int getNumberOfRows(){
		if((m_columnHeaders!=null) && (m_columnHeaders.length>0)){
			return m_values.get(m_columnHeaders[0]).size();
		}else{
			return 0;
		}
	}
	
	public String[] getColumnHeaders(){
		return m_columnHeaders;
	}
	
	public HashMap<String,List<String>> getValues(){
		return m_values;
	}
}
